@ GNU AS assembler header file for OSSpriteOp
@ Written by DefMod (Dec  9 2012) on Sun Dec  9 15:47:40 2012
@ Jonathan Coxhead, jonathan@doves.demon.co.uk, 21 Aug 1995

@ OSLib---efficient, type-safe, transparent, extensible,
@ register-safe API coverage of RISC OS
@ 
@ Copyright (c) 1994-2012 Jonathan Coxhead and OSLib maintainers
@ 
@ Licence:
@ 
@    OSLib is free software; you can redistribute it and/or modify
@ it under the terms of the GNU General Public License as published by
@ the Free Software Foundation; either version 1, or (at your option)
@ any later version - and this with the following clarification and
@ special exception:
@ 
@    Linking this library statically or dynamically with other modules
@ is making a combined work based on this library. Thus, the terms
@ and conditions of the GNU General Public License cover the whole
@ combination.
@ 
@    As a special exception, the copyright holders of this library
@ give you permission to link this library with independent modules
@ to produce an executable, regardless of the license terms of these
@ independent modules, and to copy and distribute the resulting
@ executable under terms of your choice, provided that you also meet,
@ for each linked independent module, the terms and conditions of the
@ license of that module. An independent module is a module which is
@ not derived from or based on this library. If you modify this
@ library, you may extend this exception to your version of the library,
@ but you are not obliged to do so. If you do not wish to do so, delete
@ this exception statement from your version.
@ 
@    OSLib is distributed in the hope that it will be useful,
@ but WITHOUT ANY WARRANTY; without even the implied warranty of
@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
@ GNU General Public License for more details.
@ 
@    You should have received a copy of the GNU General Public License
@ along with this programme; if not, write to the Free Software
@ Foundation, Inc, 675 Mass Ave, Cambridge, MA 02139, USA.

#ifndef OSSpriteOp_Hdr
#  define OSSpriteOp_Hdr

#  ifndef Get_Types
#    define Get_Types
#    include "oslib/Types.Hdr"
#  endif

#  ifndef Get_OS
#    define Get_OS
#    include "oslib/OS.Hdr"
#  endif

@Symbols for constants
#  define OSSpriteOp_NameLimit 0xc
#  define OSSpriteOp_SystemArea 0x0
#  define OSSpriteOp_UserArea 0x100
#  define OSSpriteOp_Name 0x100
#  define OSSpriteOp_Ptr 0x200
#  define OSSpriteOp_NewStyle 0x1
#  define OSSpriteOp_XRes 0x3ffe
#  define OSSpriteOp_XResShift 0x1
#  define OSSpriteOp_YRes 0x7ffc000
#  define OSSpriteOp_YResShift 0xe
#  define OSSpriteOp_Type 0x78000000
#  define OSSpriteOp_TypeShift 0x1b
#  define OSSpriteOp_AlphaMask 0x80000000
#  define OSSpriteOp_TypeOld 0x0
#  define OSSpriteOp_Type1bpp 0x1
#  define OSSpriteOp_Type2bpp 0x2
#  define OSSpriteOp_Type4bpp 0x3
#  define OSSpriteOp_Type8bpp 0x4
#  define OSSpriteOp_Type16bpp 0x5
#  define OSSpriteOp_Type32bpp 0x6
#  define OSSpriteOp_TypeCMYK 0x7
#  define OSSpriteOp_Type16bpp64K 0xa
#  define OSSpriteOp_Unspecified 0x100
#  define Error_SpriteOpNoWorkSpace 0x80
#  define Error_SpriteOpNotGraphics 0x81
#  define Error_SpriteOpNoRoom 0x82
#  define Error_SpriteOpNoSprites 0x83
#  define Error_SpriteOpNotEnoughRoom 0x85
#  define Error_SpriteOpDoesntExist 0x86
#  define Error_SpriteOpBadSpriteFile 0x700
#  define Error_SpriteOpNoRoomToMerge 0x701
#  define Error_SpriteOpInvalidSecondPtr 0x702
#  define Error_SpriteOpInvalidRowOrCol 0x703
#  define Error_SpriteOpInvalidHeight 0x704
#  define Error_SpriteOpInvalidWidth 0x705
#  define Error_SpriteOpNoRoomToInsert 0x706
#  define Error_SpriteOpSpriteAlreadyExists 0x707
#  define Error_SpriteOpInvalidSpriteMode 0x708
#  define Error_SpriteOpBadReasonCode 0x709
#  define Error_SpriteOpCantDoSystem 0x70a
#  define Error_SpriteOpBadTranslation 0x70b
#  define Error_SpriteOpBadGreyScale 0x70c
#  define Error_SpriteOpBadPointerShape 0x70d
#  define Error_SpriteOpBadAppend 0x70e
#  define Error_SpriteOpCantInTeletext 0x70f
#  define Error_SpriteOpInvalidSaveArea 0x710
#  define Error_SpriteOpSpriteIsCurrentDest 0x711
#  define Error_SpriteOpBadFlags 0x712
#  define Error_SpriteOpBadCoordBlock 0x713
#  define Error_SpriteOpBadSourceRectangle 0x714
#  define Error_SpriteOpBadTransformation 0x715
#  define Error_SpriteOpBadDepth 0x716
#  define Error_SpriteOpBadSwitchDepth 0x717
#  define Error_SpriteOpBadColourMap 0x720
#  define Error_SpriteOpBadJPEGUnsupported 0x721
#  define Error_SpriteOpBadJPEGProgressive 0x722
#  define Error_SpriteOpBadType 0x723
#  define OSSpriteOp_UseMask 0x8
#  define OSSpriteOp_UsePalette 0x10
#  define OSSpriteOp_GivenWideEntries 0x20
#  define OSSpriteOp_Dithered 0x40
#  define OSSpriteOp_GivenColourMapping 0x80
#  define OSSpriteOp_Translucency 0xff00
#  define OSSpriteOp_TranslucencyShift 0x8
#  define OSSpriteOp_PointerShape 0xf
#  define OSSpriteOp_PointerShapeShift 0x0
#  define OSSpriteOp_PointerIgnoreShapeData 0x10
#  define OSSpriteOp_PointerIgnorePalette 0x20
#  define OSSpriteOp_PointerIgnoreShape 0x40
#  define OSSpriteOpRemoveAlphaChannelFlags_CutOffPointShift 0x0
#  define OSSpriteOpRemoveAlphaChannelFlags_CutOffPointMask 0xff
#  define OSSpriteOpRemoveAlphaChannelFlags_RemoveMask 0x100
#  define OSSpriteOpAddAlphaChannelFlags_Add 0x80000000
#  define OSSpriteOp_DestinationCoords 0x1
#  define OSSpriteOp_SourceRectangle 0x2
#  define ServiceSpriteReregisterType_SoftwareExt 0x0
#  define ServiceSpriteReregisterType_AccelerationExt 0x1
#  define ServiceSpriteReregisterType_MonitorOrVectorExt 0x2

@Symbols for structure offsets and sizes
        .struct 0
OSSpriteOp_TransTab_c          : .skip   Byte
OSSpriteOp_TransTab            : 

        .struct 0
OSSpriteOp_ColourMapping_workspace: .skip   Ptr
OSSpriteOp_ColourMapping_function: .skip   Ptr
OSSpriteOp_ColourMapping       : 

        .struct 0
OSSpriteOp_Area_size           : .skip   Int
OSSpriteOp_Area_sprite_count   : .skip   Int
OSSpriteOp_Area_first          : .skip   Int
OSSpriteOp_Area_used           : .skip   Int
OSSpriteOp_Area                : 

        .struct 0
OSSpriteOp_Header_size         : .skip   Int
OSSpriteOp_Header_name         : .skip   12*Char
OSSpriteOp_Header_width        : .skip   Int
OSSpriteOp_Header_height       : .skip   Int
OSSpriteOp_Header_left_bit     : .skip   Int
OSSpriteOp_Header_right_bit    : .skip   Int
OSSpriteOp_Header_image        : .skip   Int
OSSpriteOp_Header_mask         : .skip   Int
OSSpriteOp_Header_mode         : .skip   OS_Mode
OSSpriteOp_Header              : 

        .struct 0
        .skip   Bits
OSSpriteOp_Flags               : 

        .struct 0
        .skip   Bits
OSSpriteOp_ModeWord            : 

@ abstract type
#  define OSSpriteOp_Id 4

        .struct 0
OSSpriteOp_SaveArea_a          : .skip   Int
OSSpriteOp_SaveArea            : 

        .struct 0
        .skip   OS_Action
OSSpriteOp_Action              : 

        .struct 0
        .skip   Bits
OSSpriteOp_PointerFlags        : 

        .struct 0
        .skip   Bits
OSSpriteOpRemoveAlphaChannel_Flags: 

        .struct 0
        .skip   Bits
OSSpriteOpAddAlphaChannel_Flags: 

        .struct 0
        .skip   Bits
OSSpriteOp_TrfmFlags           : 

        .struct 0
        .skip   Bits
ServiceSpriteReregister_Type   : 


@Symbols for SWI's and SWI reason codes
.set XOS_SpriteOp,0x2002e
.set OS_SpriteOp,0x2e

#  define OSSpriteOp_ScreenSave 0x2
   @Entry
   @  R0 = &2
   @  R2 -> file_name (String)
   @  R3 = save_palette (Bool)

#  define OSSpriteOp_ScreenLoad 0x3
   @Entry
   @  R0 = &3
   @  R2 -> file_name (String)

#  define OSSpriteOp_ReadAreaCB 0x8
   @Entry
   @  R0 = &8 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @Exit
   @  R2 = size (Int)
   @  R3 = count (Int)
   @  R4 = first (Int)
   @  R5 = used (Int)

#  define OSSpriteOp_ClearSprites 0x9
   @Entry
   @  R0 = &9 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)

#  define OSSpriteOp_LoadSpriteFile 0xa
   @Entry
   @  R0 = &A :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 -> file_name (String)

#  define OSSpriteOp_MergeSpriteFile 0xb
   @Entry
   @  R0 = &B :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 -> file_name (String)

#  define OSSpriteOp_SaveSpriteFile 0xc
   @Entry
   @  R0 = &C :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 -> file_name (String)

#  define OSSpriteOp_ReturnName 0xd
   @Entry
   @  R0 = &D :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = buffer (pointer to String)
   @  R3 = size (Int)
   @  R4 = sprite_no (Int)
   @Exit
   @  R3 = used (Int)

#  define OSSpriteOp_GetSprite 0xe
   @Entry
   @  R0 = &E :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 -> sprite_name (String)
   @  R3 = get_palette (Bool)
   @Exit
   @  R2 -> header (OSSpriteOp_Header)

#  define OSSpriteOp_CreateSprite 0xf
   @Entry
   @  R0 = &F :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 -> sprite_name (String)
   @  R3 = create_palette (Bool)
   @  R4 = width (Int)
   @  R5 = height (Int)
   @  R6 = mode (OS_Mode)

#  define OSSpriteOp_GetSpriteUserCoords 0x10
   @Entry
   @  R0 = &10 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 -> sprite_name (String)
   @  R3 = get_palette (Bool)
   @  R4 = x0 (Int)
   @  R5 = y0 (Int)
   @  R6 = x1 (Int)
   @  R7 = y1 (Int)

#  define OSSpriteOp_VerifyArea 0x11
   @Entry
   @  R0 = &11 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)

#  define OSSpriteOp_SelectSprite 0x18
   @Entry
   @  R0 = &18 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @Exit
   @  R2 -> header (OSSpriteOp_Header)

#  define OSSpriteOp_DeleteSprite 0x19
   @Entry
   @  R0 = &19 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)

#  define OSSpriteOp_RenameSprite 0x1a
   @Entry
   @  R0 = &1A :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 -> sprite_name (String)

#  define OSSpriteOp_CopySprite 0x1b
   @Entry
   @  R0 = &1B :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 -> sprite_name (String)

#  define OSSpriteOp_PutSprite 0x1c
   @Entry
   @  R0 = &1C :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R5 = action (OS_Action)

#  define OSSpriteOp_CreateMask 0x1d
   @Entry
   @  R0 = &1D :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)

#  define OSSpriteOp_RemoveMask 0x1e
   @Entry
   @  R0 = &1E :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)

#  define OSSpriteOp_InsertRow 0x1f
   @Entry
   @  R0 = &1F :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = row (Int)

#  define OSSpriteOp_DeleteRow 0x20
   @Entry
   @  R0 = &20 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = row (Int)

#  define OSSpriteOp_FlipAboutXAxis 0x21
   @Entry
   @  R0 = &21 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)

#  define OSSpriteOp_PutSpriteUserCoords 0x22
   @Entry
   @  R0 = &22 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = action (OS_Action)

#  define OSSpriteOp_AppendSprite 0x23
   @Entry
   @  R0 = &23 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id0 (OSSpriteOp_Id)
   @  R3 = id1 (OSSpriteOp_Id)
   @  R4 = append_vertically (Bool)

#  define OSSpriteOp_SetPointerShape 0x24
   @Entry
   @  R0 = &24 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = pointer_flags (OSSpriteOp_PointerFlags)
   @  R4 = xactive (Int)
   @  R5 = yactive (Int)
   @  R6 -> factors (OS_Factors)
   @  R7 -> trans_tab (OSSpriteOp_TransTab)

#  define OSSpriteOp_ReadPaletteSize 0x25
   @Entry
   @  R0 = &25 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = &FFFFFFFF
   @Exit
   @  R3 = size (Int)
   @  R4 -> palette (OS_SpritePalette)
   @  R5 = mode (OS_Mode)

#  define OSSpriteOp_RemovePalette 0x25
   @Entry
   @  R0 = &25 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = &0
   @Exit
   @  R4 corrupted
   @  R5 corrupted

#  define OSSpriteOp_CreatePalette 0x25
   @Entry
   @  R0 = &25 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = &1
   @Exit
   @  R4 corrupted
   @  R5 corrupted

#  define OSSpriteOp_CreateTruePalette 0x25
   @Entry
   @  R0 = &25 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = &80000000
   @Exit
   @  R4 corrupted
   @  R5 corrupted

#  define OSSpriteOp_RemoveAlphaChannel 0x26
   @Entry
   @  R0 = &26 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = aflags (OSSpriteOpRemoveAlphaChannel_Flags)

#  define OSSpriteOp_AddAlphaChannel 0x26
   @Entry
   @  R0 = &26 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = &80000000 :OR: aflags (OSSpriteOpAddAlphaChannel_Flags)

#  define OSSpriteOp_ReadSpriteInfo 0x28
   @Entry
   @  R0 = &28 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @Exit
   @  R3 = width (Int)
   @  R4 = height (Int)
   @  R5 = mask (Bool)
   @  R6 = mode (OS_Mode)

#  define OSSpriteOp_ReadPixelColour 0x29
   @Entry
   @  R0 = &29 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @Exit
   @  R5 = gcol (OS_GCOL)
   @  R6 = tint (OS_Tint)

#  define OSSpriteOp_ReadPixelColourDeep 0x29
   @Entry
   @  R0 = &29 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @Exit
   @  R5 = gcol (Bits)
   @  R6 = tint (OS_Tint)

#  define OSSpriteOp_WritePixelColour 0x2a
   @Entry
   @  R0 = &2A :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = gcol (OS_GCOL)
   @  R6 = tint (OS_Tint)

#  define OSSpriteOp_WritePixelColourDeep 0x2a
   @Entry
   @  R0 = &2A :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = gcol (Bits)
   @  R6 = tint (OS_Tint)

#  define OSSpriteOp_ReadPixelMask 0x2b
   @Entry
   @  R0 = &2B :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @Exit
   @  R5 = solid (Bool)

#  define OSSpriteOp_ReadPixelMaskAlpha 0x2b
   @Entry
   @  R0 = &2B :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @Exit
   @  R5 = opacity (Int)

#  define OSSpriteOp_WritePixelMask 0x2c
   @Entry
   @  R0 = &2C :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = solid (Bool)

#  define OSSpriteOp_WritePixelMaskAlpha 0x2c
   @Entry
   @  R0 = &2C :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = opacity (Int)

#  define OSSpriteOp_InsertColumn 0x2d
   @Entry
   @  R0 = &2D :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = column (Int)

#  define OSSpriteOp_DeleteColumn 0x2e
   @Entry
   @  R0 = &2E :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = column (Int)

#  define OSSpriteOp_FlipAboutYAxis 0x2f
   @Entry
   @  R0 = &2F :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)

#  define OSSpriteOp_PlotMask 0x30
   @Entry
   @  R0 = &30 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)

#  define OSSpriteOp_PlotMaskUserCoords 0x31
   @Entry
   @  R0 = &31 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)

#  define OSSpriteOp_PlotMaskScaled 0x32
   @Entry
   @  R0 = &32 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 -> factors (OS_Factors)

#  define OSSpriteOp_PaintCharScaled 0x33
   @Entry
   @  R0 = &33
   @  R1 = c (Char)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R6 -> factors (OS_Factors)

#  define OSSpriteOp_PutSpriteScaled 0x34
   @Entry
   @  R0 = &34 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = action (OSSpriteOp_Action)
   @  R6 -> factors (OS_Factors)
   @  R7 -> trans_tab (OSSpriteOp_TransTab)

#  define OSSpriteOp_PutSpriteScaledMapped 0x34
   @Entry
   @  R0 = &34 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = &80 :OR: action (OSSpriteOp_Action)
   @  R6 -> factors (OS_Factors)
   @  R7 -> mapping (OSSpriteOp_ColourMapping)

#  define OSSpriteOp_PutSpriteGreyScaled 0x35
   @Entry
   @  R0 = &35 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = &0
   @  R6 -> factors (OS_Factors)
   @  R7 -> trans_tab (OSSpriteOp_TransTab)

#  define OSSpriteOp_RemoveLeftHandWastage 0x36
   @Entry
   @  R0 = &36 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)

#  define OSSpriteOp_PlotMaskTrfm 0x37
   @Entry
   @  R0 = &37 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = trfm_flags (OSSpriteOp_TrfmFlags)
   @  R4 -> source_rect (OS_Box)
   @  R6 -> trfm (OS_Trfm)

#  define OSSpriteOp_PutSpriteTrfm 0x38
   @Entry
   @  R0 = &38 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = trfm_flags (OSSpriteOp_TrfmFlags)
   @  R4 -> source_rect (OS_Box)
   @  R5 = action (OSSpriteOp_Action)
   @  R6 -> trfm (OS_Trfm)
   @  R7 -> trans_tab (OSSpriteOp_TransTab)

#  define OSSpriteOp_PutSpriteTrfmMapped 0x38
   @Entry
   @  R0 = &38 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = trfm_flags (OSSpriteOp_TrfmFlags)
   @  R4 -> source_rect (OS_Box)
   @  R5 = &80 :OR: action (OSSpriteOp_Action)
   @  R6 -> trfm (OS_Trfm)
   @  R7 -> mapping (OSSpriteOp_ColourMapping)

#  define OSSpriteOp_InsertDeleteRows 0x39
   @Entry
   @  R0 = &39 :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = row_no (Int)
   @  R4 = row_count (Int)

#  define OSSpriteOp_InsertDeleteColumns 0x3a
   @Entry
   @  R0 = &3A :OR: flags (OSSpriteOp_Flags)
   @  R1 = area (pointer to OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = column_no (Int)
   @  R4 = column_count (Int)

#  define OSSpriteOp_SwitchOutputToSprite 0x3c
   @Entry
   @  R0 = &3C :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = save_area (pointer to OSSpriteOp_SaveArea)
   @Exit
   @  R0 = context0 (Int)
   @  R1 = context1 (Int)
   @  R2 = context2 (Int)
   @  R3 = context3 (Int)

#  define OSSpriteOp_SwitchOutputToMask 0x3d
   @Entry
   @  R0 = &3D :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = save_area (pointer to OSSpriteOp_SaveArea)
   @Exit
   @  R0 = context0 (Int)
   @  R1 = context1 (Int)
   @  R2 = context2 (Int)
   @  R3 = context3 (Int)

#  define OSSpriteOp_ReadSaveAreaSize 0x3e
   @Entry
   @  R0 = &3E :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @Exit
   @  R3 = size (Int)

.set XOSSpriteOp_UnswitchOutput,0x2002e
.set OSSpriteOp_UnswitchOutput,0x2e
   @Entry
   @  R0 = context0 (Int)
   @  R1 = context1 (Int)
   @  R2 = context2 (Int)
   @  R3 = context3 (Int)

#  define OSSpriteOp_PlotTiledSprite 0x41
   @Entry
   @  R0 = &41 :OR: flags (OSSpriteOp_Flags)
   @  R1 -> area (OSSpriteOp_Area)
   @  R2 = id (OSSpriteOp_Id)
   @  R3 = x (Int)
   @  R4 = y (Int)
   @  R5 = action (OSSpriteOp_Action)
   @  R6 -> factors (OS_Factors)
   @  R7 -> trans_tab (OSSpriteOp_TransTab)

#  define SpriteV 0x1f

#  define Service_SwitchingOutputToSprite 0x72
   @Entry
   @  R1 = &72

#  define Service_SpriteReregister 0xe1
   @Entry
   @  R0 = type (ServiceSpriteReregister_Type)
   @  R1 = &E1

#endif
